Skip to content

app: sock options TLS_DTLS_CONN_SAVE/LOAD#195

Open
DematteisGiacomo wants to merge 1 commit intonrfconnect:mainfrom
DematteisGiacomo:dtls_conn_save_load
Open

app: sock options TLS_DTLS_CONN_SAVE/LOAD#195
DematteisGiacomo wants to merge 1 commit intonrfconnect:mainfrom
DematteisGiacomo:dtls_conn_save_load

Conversation

@DematteisGiacomo
Copy link
Collaborator

@DematteisGiacomo DematteisGiacomo commented Feb 26, 2026

TLS_DTLS_CID is supported, but TLS_DTLS_CONN_SAVE/LOAD not. Add support for saving and loading DTLS session via CID. Additionally, fix incorrect enum values to match nRF socket API.

Jira: SM-254

TLS_DTLS_CID is supported, but TLS_DTLS_CONN_SAVE/LOAD not.
Add support for saving and loading DTLS session via CID.
Additionally, fix incorrect enum values to match nRF socket API.

Signed-off-by: Giacomo Dematteis <giacomo.dematteis@nordicsemi.no>

* ``<value>`` is an integer that indicates the DTLS handshake timeout in seconds.
It can be one of the following values: ``1``, ``3``, ``7``, ``15``, ``31``, ``63``, ``123``.
* ``<value>`` must be set to ``0`` to save the DTLS connection state.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't it so, that a value has to be provided, but it does not matter what it is? I think it's ok to say that the value must be set for example to 0, but the value for AT_TLS_DTLS_CONN_SAVE and AT_TLS_DTLS_CONN_LOAD should be the same. Now it isn't.

Comment on lines +640 to +645
After this option is successfully called, you must call ``AT_TLS_DTLS_CONN_LOAD`` before continuing to communicate on the socket.

* ``22`` - ``AT_TLS_DTLS_FRAG_EXT``.
This is only supported by the following modem firmware:
* mfw_nrf9160 v1.3.5 or later
* mfw_nrf91x1
* mfw_nrf9151-ntn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation is off, I think. These should be on the same level as the option (17/AT_TLS_DTLS_CONN_SAVE), not the value, right? It affects how the documentation is generated.

It looks like documentation is generated for an SM PR, but I couldn't find a link to it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation is not stored anywhere. It's just built for PRs. We use local building when needed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Serial Modem doesn't support nrf9160. I don't think we need this note or the one for AT_TLS_DTLS_CONN_LOAD.

Comment on lines +652 to +655
This is only supported by the following modem firmware:
* mfw_nrf9160 v1.3.5 or later
* mfw_nrf91x1
* mfw_nrf9151-ntn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, correct the indentation.

Comment on lines 666 to 668
This is only supported by the following modem firmware:

* mfw_nrf91x1 v2.0.4 or later
* mfw_nrf9151-ntn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* ``<value>`` can be any integer value.

* ``14`` - ``AT_TLS_DTLS_CID`` (set-only).
* ``14`` - ``AT_TLS_DTLS_HANDSHAKE_TIMEO``.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will try everything to avoid breaking the API. This is a case where I don't think we have justification for doing it.

I believe this value is originating from zephyr/include/zephyr/net/socket.h:
#define TLS_DTLS_CID 14

Nowadays the defines have ZSOCK_ prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants